#!/usr/bin/env php
<?php


$command = $argv[1] ?? '';
if(empty($command)){
    echo "Please input command's name";
    return;
}
require('./vendor/autoload.php');
$commandConfig = require_once("./config/command.php");
require_once __DIR__ . '/vendor/autoload.php';

if( empty($commandConfig) || !isset($commandConfig[$command])){
    echo "Unkown command :" . $command;
    return;
}

$obj = $commandConfig[$command];

//调用命令
call_user_func([new $obj , 'handle']);







